import { join } from "path";
// import platform from "../utils/platform";
import { BrowserWindowConstructorOptions } from "electron";

export const windowConfig:BrowserWindowConstructorOptions = {
    center: true,
    // frame: !(platform.isWindows || platform.isLinux),
    show: false,
    // titleBarStyle: 'hidden',
    webPreferences: {
        webSecurity: false, // 跨域问题 -> 打开注释
        contextIsolation: true, // false -> 可在渲染进程中使用electron的api，true->需要bridge.js(contextBridge)
        nodeIntegration: true,
        preload: join(__dirname, '../preload/index.js')
    },
    // mac 自定义红绿灯位置
    trafficLightPosition: {
        x: 4,
        y: 5
    }
}